package com.city.repository.report;

import com.city.domain.pub.PubUser;
import com.city.domain.report.CtUserBranch;
import org.springframework.data.jpa.repository.JpaRepository;
import org.springframework.data.jpa.repository.Query;

import java.util.List;

public interface CtUserBranchRepository extends JpaRepository<CtUserBranch,Integer> {

    @Query(value = "select c.branch_id from ct_user_branch c where user_id=?1",nativeQuery = true)
    Integer findBranchIdByUserId(Integer userId);

    @Query(value = "select * from ct_user_branch c where user_id=?1",nativeQuery = true)
    CtUserBranch findBranchByUserId(Integer userId);
}
